// 创建路由实例
import Layout from "@/pages/Layout/index";
import Month from "@/pages/Month/index";
import New from "@/pages/New";
import NoFound from "@/pages/NoFound";
import Year from "@/pages/Year";
import { createBrowserRouter } from "react-router-dom";

const router = createBrowserRouter([
    {
        path: '/',
        element: <Layout></Layout>,
        children: [
            {
                path: 'month',
                element: <Month></Month>,
                index: true

            },
            {
                path: 'year',
                element: <Year></Year>

            },
          
        ]

    },
    {
        path: '/new',
        element: <New></New>
    },
    {
        path: '*',
        element: <NoFound></NoFound>
    }
])

export default router